public class Demo2 {
    public static void main(String[] args) {
        System.out.println(fac(10));
    }
    public static int fac(int n) {
        int sum = 0;
        for(int i = 1;i <= n;i++) {
            sum+=i;
        }
        return sum;
    }
}
